Quick-Tip

TIL: time travel with Python’s standard library

There are a few different approaches for writing tests for date and/or time-sensitive functionality.

One could choose to add a sleep() in the test, which would guarantee that the time passed, but that also has the downside of increasing the run time of the test.

A caller id for your python function

Most of you might be too young to know this but there was time that the phone in your house - not in your pocket! - would ring and gasp! you had no idea who was calling! You had to ANSWER the phone to find out. :scream:

Go to line number in a file using vim

You want to see line 3842 of file called my_super_long_file.py and you can only access that file using vim. You open the file and to your dismay, by default, vim doesn’t display line numbers. Here are your options: